#!/bin/bash

# this is an sample shell script
# you will need to develop this to 
# complete the assignment for week 7

echo "Test Case 1: Testing 20/28..."

tc=`java -jar Grades_v2.jar 20 28`
 echo "Expected output : Component Fail"
if [ "$tc" = "Component Fail" ]
  then
  echo "Test Passed"
else 
  echo "Test not passed"  
fi

echo "-----------------------------------------------------"

echo "Test Case 2: Testing 45/38..."
 echo "Expected output : Component Fail"
tc=`java -jar Grades_v2.jar 45 38`

if [ "$tc" = "Component Fail" ]
  then
  echo "Test Passed"
else 
  echo "Test not passed"  
fi
echo "-----------------------------------------------------"

echo "Test Case 3: Testing 30/45..."
 echo "Expected output : Component Fail"
tc=`java -jar Grades_v2.jar 30 45`

if [ "$tc" = "Component Fail" ]
  then
  echo "Test Passed"
else 
  echo "Test not passed"  
fi

echo "-----------------------------------------------------"

echo "Test Case 4: Testing 45/52..."
 echo "Expected output : Fail"
tc=`java -jar Grades_v2.jar 45 52`

if [ "$tc" = "Fail" ]
  then

  echo "Test Passed"
else 
  echo "Test not passed"  
fi

echo "-----------------------------------------------------"

echo "Test Case 5: Testing 50/80..."
 echo "Expected output : Pass"
tc=`java -jar Grades_v2.jar 50 80`

if [ "$tc" = "Pass" ]
  then
  echo "If  >=50 < 80. Expected output : Pass"
 echo "Test Passed"
fi
echo "-----------------------------------------------------"
echo "Test Case 6: Testing 81/100..."

tc=`java -jar Grades_v2.jar 81 100`
 echo "Expected output : Pass with Distinction"
if [ "$tc" = "Pass with Distinction" ]
  then
  echo "Test Passed"
else 
  echo "Test not passed"  
fi








